/******************************************************************************
 * Copyright 2023 The Apollo Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *****************************************************************************/

#pragma once

#include "modules/canbus_vehicle/x3epro/proto/x3epro.pb.h"
#include "modules/drivers/canbus/can_comm/protocol_data.h"

namespace apollo {
namespace canbus {
namespace x3epro {

class Aebsystemstate11 : public ::apollo::drivers::canbus::ProtocolData<
                    ::apollo::canbus::X3epro> {
 public:
  static const int32_t ID;
  Aebsystemstate11();
  void Parse(const std::uint8_t* bytes, int32_t length,
                     X3epro* chassis) const override;

 private:

    // config detail: {'bit': 1, 'enum': {0: 'AEB_STATE_ULTRASONIC_ONLY', 1: 'AEB_STATE_ULTRASONIC_BRAKE_NORMAL'}, 'is_signed_var': False, 'len': 2, 'name': 'AEB_State', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Aeb_systemstate_11::Aeb_stateType aeb_state(const std::uint8_t* bytes, const int32_t length) const;

    // config detail: {'bit': 2, 'enum': {0: 'AEB_BRAKESTATE_BRAKE_OFF', 1: 'AEB_BRAKESTATE_BRAKE_ON'}, 'is_signed_var': False, 'len': 1, 'name': 'AEB_BrakeState', 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
    Aeb_systemstate_11::Aeb_brakestateType aeb_brakestate(const std::uint8_t* bytes, const int32_t length) const;
};

}  // namespace x3epro
}  // namespace canbus
}  // namespace apollo


